Skip to content

Conversation

DragonSenseiGuy
Copy link
Contributor

@DragonSenseiGuy DragonSenseiGuy commented Sep 2, 2025

Change log:

  • Added alt-text for the Welcome Video in the homepage
  • Added alt-texts of "" for images that does not affect people with screen-reader in the events page as well as the timeline page
  • Changes alt-texts in the events page form "AoC" to "Advent of Code" so, people who don't have knowledge about it can still know what it is.
  • Change date in the 3.13 release from 2022 to 2024

Fixes

Copy link

netlify bot commented Sep 2, 2025

Deploy Preview for pydis-static ready!

Name Link
🔨 Latest commit 7be958a
🔍 Latest deploy log https://app.netlify.com/projects/pydis-static/deploys/68d1e46f6ec1110008438f75
😎 Deploy Preview https://deploy-preview-1562--pydis-static.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coveralls
Copy link

coveralls commented Sep 2, 2025

Coverage Status

coverage: 100.0%. remained the same
when pulling 7be958a on DragonSenseiGuy:accessibility
into 023881d on python-discord:main.

@jb3 jb3 changed the title Accessibility Address some issues from the accessibility milestone Sep 2, 2025
@jchristgit
Copy link
Member

Thank you for the PR! FYI it'll take me a while to review this, I'm a bit swamped with work right now :-)

@DragonSenseiGuy
Copy link
Contributor Author

Thank you for the PR! FYI it'll take me a while to review this, I'm a bit swamped with work right now :-)

NP take your time

<div class="media-left">
<p class="image is-64x64">
<a href="{% url "events:page" path="code-jams/12" %}"><img class="is-rounded" src="/static/images/events/summer_code_jam_2025/logo.png"></a>
<a href="{% url "events:page" path="code-jams/12" %}"><img class="is-rounded" src="/static/images/events/summer_code_jam_2025/logo.png" alt=""></a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do these three have alt=""? As proper links they should be clickable and with empty alt text it will be ignored by screen readers, right?

Copy link
Contributor Author

@DragonSenseiGuy DragonSenseiGuy Sep 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1406 (comment)

"While descriptive text is imperative to describe images to those who can’t see them, these images are purely decorative and add no value to someone not seeing the page. Use alt=”” instead so the experience with a screen reader is less cluttered."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These images are not decorative. If they are the primary (and in this case sole) component within an <a> tag then they are by definition not decorative, they are serving a purpose as a hyperlink to the code jam pages and as such must have appropriate alt text.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These images are not decorative. If they are the primary (and in this case sole) component within an <a> tag then they are by definition not decorative, they are serving a purpose as a hyperlink to the code jam pages and as such must have appropriate alt text.

I'm just following what the issue says, but I can add it if needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just following what the issue says, but I can add it if needed.

Yes, the issue generally covers the situations where that is a problem, but this is not one of them.

Hypothetically for the following content:

<div id="main">
  <!-- where this is a decorative graphic that holds no useful user information -->
  <img src="/some/graphic.png" />
</div>

The image there is decorative, is not clickable, serves no purpose and thus is not worth having alt text for, adding alt text here would just be noise for a screen reader. So, we'd add alt="":

<div id="main">
  <!-- where this is a decorative graphic that holds no useful user information -->
  <img src="/some/graphic.png" alt="" />
</div>

However, if the <img> is within an <a> then that image is clickable, and if there is nothing else in that <a> then there is nothing else to indicate to a user what they are clicking.

For example, basing things off your current PR, we have something like the following:

<a href="/login">
  <img src="/login_graphic.png" alt="" />
</a>

There is no descriptive text inside the <a>, so a screenreader cannot look at this and say anything to the user along the lines of "This is a login button", it has no idea how to describe the content because we have explicitly disabled the alt text.

It's very important to keep the descriptive text where the object is not decorative, obviously an image that is acting as a button/link is not decorative since clicking it takes you somewhere.

Break down your elements into three categories: informational, decorative or actions.

  • You can have buttons that are actions, they take you somewhere when you click them. These obviously must be eithered labelled with text elements or be an image element with alt text.
  • You can have images that may contain information or may add information to content surrounding them (even if accessibility tools cannot read the image content), these also obviously need alt text to symbolise to a screenreader/user using accessibility tooling what the content of that image is.
  • Decorative objects are objects where you could remove them from the document and the content and actions from the document would remain the same, you can gain the same information from the document and use the same actions to continue browsing to other areas of the webpage.

Decorative objects do not need accessibility text because it is not important that tools to help with visual impairment describe elements of a webpage that have no use to users who are visually impaired (for example, some fancy SVG background doesn't need explaining to a user who has no way to see the background).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On it, probably will have a new commit in like 1-2 days.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@jb3 jb3 merged commit a69fb04 into python-discord:main Sep 24, 2025
11 checks passed
@DragonSenseiGuy
Copy link
Contributor Author

@jb3 Thanks for the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alt text on decorative images on timeline is useless Non-descriptive alt text on thumbnail on home page No alt text for images on events page
6 participants